home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bpushbutton.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.8 KB  |  76 lines

  1. /* 
  2.  *
  3.  * $Id: k3bpushbutton.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2004-2007 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_PUSH_BUTTON_H_
  17. #define _K3B_PUSH_BUTTON_H_
  18.  
  19.  
  20. #include <kpushbutton.h>
  21. #include "k3b_export.h"
  22.  
  23. /**
  24.  * A pushbutton with delayed popu pmenu support just like the KToolBarButton
  25.  */
  26. class LIBK3B_EXPORT K3bPushButton : public KPushButton
  27. {
  28.  Q_OBJECT
  29.  
  30.  public:
  31.   /**
  32.    * Default constructor.
  33.    */
  34.   K3bPushButton( QWidget* parent = 0, const char* name = 0 );
  35.  
  36.   /**
  37.    * Constructor, that sets the button-text to @p text
  38.    */
  39.   K3bPushButton( const QString& text, QWidget* parent = 0, const char* name = 0 );
  40.  
  41.   /**
  42.    * Constructor, that sets an icon and the button-text to @p text
  43.    */
  44.   K3bPushButton( const QIconSet& icon, const QString& text,
  45.          QWidget* parent = 0, const char* name = 0 );
  46.  
  47.   /**
  48.    * Constructor that takes a KGuiItem for the text, the icon, the tooltip
  49.    * and the what's this help
  50.    */
  51.   K3bPushButton( const KGuiItem& item, QWidget* parent = 0, const char* name = 0 );
  52.  
  53.   /**
  54.    * Destructs the button.
  55.    */
  56.   ~K3bPushButton();
  57.  
  58.   /**
  59.    * The popup menu will show if the button is pressed down for about half a second
  60.    * or if the mouse is moved while pressed just like the KToolBarButton.
  61.    */
  62.   void setDelayedPopupMenu( QPopupMenu* );
  63.  
  64.  protected:
  65.   virtual bool eventFilter( QObject*, QEvent* );
  66.  
  67.  private slots:
  68.   void slotDelayedPopup();
  69.  
  70.  private:
  71.   class Private;
  72.   Private* d;
  73. };
  74.  
  75. #endif
  76.